NetCloak 2.5 User's Guide

Client Commands


<INSERT_CLIENT>

This command will place the name of the user's Web browser, as text, into your document at the specified point. The browser name is defined by the browser itself.

Here is an example:

     Your Web browser is <INSERT_CLIENT>.

<HIDE_CLIENT client1 client2 ...>

This command hides the HTML text from clients using the specified Web browser. It is most commonly used to tailor elements of a page to match the features of particular browsers.

The HIDE_CLIENT actually works on the identification string that the browser sends with each request, which may not exactly match the browser's name. The two most popular browsers, Netscape Navigator and Internet Explorer, each have some peculiarities.

Spiders from search engines such as Yahoo or HotBot also identify themselves the same way that browsers do. The identification string frequently also includes the version number and platform of the browser or spider. This information creates additional uses for HIDE_CLIENT, allowing you to provide special content to Web robots that will control which links on your site are crawled or optimize their index of your pages.

Navigator identifies itself as "Mozilla", not "Navigator" or "Netscape". This is further complicated by the fact that most versions of Internet Explorer also identify themselves as "Mozilla", followed by "compatible" and "MSIE". Differentiating the two is no problem with NetCloak, but requires a bit of extra work. Here are the identifications of some common browsers:

Mozilla/2.0 (compatible; MSIE 2.1; Mac_PowerPC)
Mozilla/2.0 (compatible; MSIE 3.0; Mac_PowerPC)
Mozilla/3.0 (compatible; MSIE 4.0; Mac_PowerPC)
Mozilla/2.0 (Macintosh; I; PPC)
Mozilla/3.0 (Macintosh; I; PPC)
Mozilla/4.03 (Macintosh; U; PPC)

To distinguish Navigator and Explorer (not to mention other Netscape "compatible" browsers), simply add an extra "HIDE" or "SHOW" to check for the word "compatible", as in:

     You are using
     <HIDE><SHOW_CLIENT Mozilla><HIDE_CLIENT compatible>Netscape Navigator
     <HIDE><SHOW_CLIENT MSIE>Internet Explorer
     <SHOW>

The HIDE_CLIENT command causes text to be hidden when any of the "client" parameters are contained anywhere in the browser's identification, so there is normally no need to specify the entire browser name. It is best to specify enough of the browser name to uniquely identify it without specifying so much that different versions of the same browser are treated differently (unless that is the desired effect). For example, to hide a portion of your HTML document from Navigator clients, you would probably just use:

     <HIDE_CLIENT Mozilla>

To specify a particular version, you could use something similar to:

     <HIDE_CLIENT Mozilla/2>

Since the name specified in the command can appear anywhere in the identification, you can use it to match other information in the string. For example, the Macintosh version of most browsers include "Mac" in their name, so you can use the HIDE_CLIENT command to customize your pages for Macintosh clients. To hide text from Macintosh browsers, you can simply use:

     <HIDE_CLIENT Mac>.

Unfortunately, it is impossible to give a complete list of Web browser identifications, since new client applications and new versions of existing ones are certainly going to become available. The best way to find out the name of an individual browser is to set up a cloaked page with an INSERT_CLIENT command, and then access it from the browser in question. The page will then show you exactly what the browser gives as its name. You can also look at your Web server log file to see the identification string for Web browsers used by people visiting your Web site.

<SHOW_CLIENT client1 client2 ...>

This command is the opposite of HIDE_CLIENT. Any HTML that follows will be visible only to the clients listed.


[ Command Listing | Table Of Contents ]

Copyright © 1996-7 Maxum Development Corporation
820 South Bartlett Road - Suite 104
Streamwood, IL 60107
http://www.maxum.com/